//
//  GCCommentReplayTableViewCell.m
//  GoldChampion
//
//  Created by Mac on 2018/4/13.
//  Copyright © 2018年 stoneobs@icloud.com. All rights reserved.
//

#import "GCCommentReplayTableViewCell.h"

@interface  GCCommentReplayTableViewCell()
@property(nonatomic, strong) STButton     *iconButton;
@property(nonatomic, strong) STLabel     *titleLable;
@property(nonatomic, strong) STLabel     *desLable;
@property(nonatomic, strong) STLabel     *timeLable;
@end
@implementation GCCommentReplayTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self configSubView];
    }
    return self;
}
+ (CGFloat)cellHeight{
    return 70;
}
#pragma mark --subView
- (void)configSubView{
    self.iconButton = [[STButton alloc] initWithFrame:CGRectMake(75, 10, 40, 40)
                                                title:nil
                                           titleColor:nil
                                            titleFont:0
                                         cornerRadius:20
                                      backgroundColor:nil
                                      backgroundImage:[UIImage imageNamed:@"做品2"]
                                                image:nil];
    self.iconButton.centerY = [[self class] cellHeight] / 2;
    [self addSubview:self.iconButton];
    
    STLabel * titleLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.right + 10,self.iconButton.top, UIScreenWidth - self.iconButton.right, 20)
                                                     text:@"stoneobs回复一只米粒"
                                                textColor:FirstTextColor
                                                     font:14
                                              isSizetoFit:NO
                                            textAlignment:NSTextAlignmentLeft];
    self.titleLable = titleLable;
    self.titleLable.attributedText = [self.titleLable.text st_convertAttributeStringWithKeyWord:@"回复"
                                                                                   attributes:@{NSForegroundColorAttributeName:FlatOrange}];
    [self addSubview:self.titleLable];
    
    STLabel * desLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.right+ 10,self.titleLable.bottom, UIScreenWidth - self.iconButton.right, 20)
                                                   text:@"方便  53分钟前"
                                              textColor:SecendTextColor
                                                   font:12
                                            isSizetoFit:NO
                                          textAlignment:NSTextAlignmentLeft];
    self.desLable = desLable;
    self.desLable.attributedText = [self.desLable.text st_convertAttributeStringWithKeyWord:@"53分钟前" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:10]}];
    [self addSubview:self.desLable];
    
//    STLabel * timeLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.right+10,self.desLable.bottom, UIScreenWidth - self.iconButton.right, 20)
//                                                    text:@"15分钟前"
//                                               textColor:SecendTextColor
//                                                    font:12
//                                             isSizetoFit:NO
//                                           textAlignment:NSTextAlignmentLeft];
//    self.timeLable = timeLable;
//    self.timeLable.centerY = self.titleLable.centerY;
//    self.timeLable.right = UIScreenWidth - 15;
//    [self addSubview:self.timeLable];
}

@end
